#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;

int n, a[N], b[N], ans[N];

struct number
{
    int id1, id2, val;
    bool operator<(const number &a) const
    {
        return val > a.val;
    }
};


priority_queue<number> h;

int main()
{
    ios::sync_with_stdio(false);
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> a[i];
    for (int i = 1; i <= n; i++)
        cin >> b[i];
    for (int i = 1; i <= n; i++)
        h.push((number){i, 1, a[i] + b[1]});
    for (int i = 1; i <= n; i++)
    {
        number top = h.top();
        h.pop();
        ans[i] = top.val;
        h.push((number){top.id1, top.id2 + 1, a[top.id1] + b[top.id2 + 1]});
    }
    for (int i = 1; i <= n; i++)
        cout << ans[i] << ' ';
    cout << endl;
    return 0;
}